<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class PnkPagination 
{	
  	public function initConfig($name, $model)
  	{		
		// Setup config pagination
	    $config = array(
	      'base_url' => base_url() . 'backend/' . $name . '/index',
	      'total_rows' => $model->cnt(),
	      'per_page' => 5,
	      'num_links' => 5,
	      'uri_segment' => 4,
	      'use_page_numbers' => TRUE,
	      'cur_tag_open'  => '<li class="active"><span>',
	      'cur_tag_close' => '</span></li>'    
	    );
	    $config['num_tag_open']  = $config['prev_tag_open']  = $config['next_tag_open']  = $config['last_tag_open'] = $config['first_tag_open'] = '<li>';
	    $config['num_tag_close'] = $config['prev_tag_close'] = $config['next_tag_close'] = $config['last_tag_close'] = $config['first_tag_close'] ='</li>';
	    
	    return $config;
  	}
}